﻿namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class AddressController : NAGFwk.BL.IBaseController<Model.Address>
    {
    
           private readonly SilkeyERP.Model.AddressRepository Repository;
    
            public AddressController()
            {
                    this.Repository = new Model.AddressRepository();
            }
    
    		public struct AddressRelatedEntities
            {
                			   
    			      public string Bank { get { return "Bank"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			  			   
    			      public string Suppliers { get { return "Suppliers"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Address GetAddressWithAllChilds(int AddressID) 
            {
    				 return this.Repository.GetAddressWithAllChilds(AddressID);
    		}
    			
            public SilkeyERP.Model.Address GetAddress(int AddressID) 
            {
    		    return this.Repository.GetAddress(AddressID); 
    		}
    				public List<SilkeyERP.Model.Address> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Address GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Address GetAddressWithBank(int AddressID) 
    		{
    		    return this.Repository.GetAddressWithBank(AddressID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Address GetAddressWithCustomer(int AddressID) 
    		{
    		    return this.Repository.GetAddressWithCustomer(AddressID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Address GetAddressWithSalesPerson(int AddressID) 
    		{
    		    return this.Repository.GetAddressWithSalesPerson(AddressID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Address GetAddressWithSuppliers(int AddressID) 
    		{
    		    return this.Repository.GetAddressWithSuppliers(AddressID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Address Obj)
            {
                Delete(Obj.AddressID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Address Obj)
            {
                DeleteLogical(Obj.AddressID);
            }
    	
            public void Delete(int AddressID) 
    		{
    			this.Repository.Delete(AddressID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Address MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Address MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Address Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Address Insert(SilkeyERP.Model.Address MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Address> Insert(List<SilkeyERP.Model.Address> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Address MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Address MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Address MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Address MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Address MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class BankController : NAGFwk.BL.IBaseController<Model.Bank>
    {
    
           private readonly SilkeyERP.Model.BankRepository Repository;
    
            public BankController()
            {
                    this.Repository = new Model.BankRepository();
            }
    
    		public struct BankRelatedEntities
            {
                			   
    			      public string City { get { return "City"; } }
    			  			   
    			      public string BankAccounts { get { return "BankAccounts"; } }
    			  			   
    			      public string Address { get { return "Address"; } }
    			  			   
    			      public string Email { get { return "Email"; } }
    			  			   
    			      public string Phones { get { return "Phones"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Bank GetBankWithAllChilds(int BankID) 
            {
    				 return this.Repository.GetBankWithAllChilds(BankID);
    		}
    			
            public SilkeyERP.Model.Bank GetBank(int BankID) 
            {
    		    return this.Repository.GetBank(BankID); 
    		}
    				public List<SilkeyERP.Model.Bank> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Bank GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Bank GetBankWithCity(int BankID) 
    		{
    		    return this.Repository.GetBankWithCity(BankID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Bank GetBankWithBankAccounts(int BankID) 
    		{
    		    return this.Repository.GetBankWithBankAccounts(BankID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Bank GetBankWithAddress(int BankID) 
    		{
    		    return this.Repository.GetBankWithAddress(BankID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Bank GetBankWithEmail(int BankID) 
    		{
    		    return this.Repository.GetBankWithEmail(BankID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Bank GetBankWithPhones(int BankID) 
    		{
    		    return this.Repository.GetBankWithPhones(BankID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Bank Obj)
            {
                Delete(Obj.BankID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Bank Obj)
            {
                DeleteLogical(Obj.BankID);
            }
    	
            public void Delete(int BankID) 
    		{
    			this.Repository.Delete(BankID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Bank MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Bank MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Bank Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Bank Insert(SilkeyERP.Model.Bank MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Bank> Insert(List<SilkeyERP.Model.Bank> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Bank MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Bank MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Bank MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Bank MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Bank MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class BankAccountsController : NAGFwk.BL.IBaseController<Model.BankAccounts>
    {
    
           private readonly SilkeyERP.Model.BankAccountsRepository Repository;
    
            public BankAccountsController()
            {
                    this.Repository = new Model.BankAccountsRepository();
            }
    
    		public struct BankAccountsRelatedEntities
            {
                			   
    			      public string Bank { get { return "Bank"; } }
    			  			   
    			      public string Checks { get { return "Checks"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.BankAccounts GetBankAccountsWithAllChilds(int BankAccountsID) 
            {
    				 return this.Repository.GetBankAccountsWithAllChilds(BankAccountsID);
    		}
    			
            public SilkeyERP.Model.BankAccounts GetBankAccounts(int BankAccountsID) 
            {
    		    return this.Repository.GetBankAccounts(BankAccountsID); 
    		}
    				public List<SilkeyERP.Model.BankAccounts> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public BankAccounts GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.BankAccounts GetBankAccountsWithBank(int BankAccountsID) 
    		{
    		    return this.Repository.GetBankAccountsWithBank(BankAccountsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.BankAccounts GetBankAccountsWithChecks(int BankAccountsID) 
    		{
    		    return this.Repository.GetBankAccountsWithChecks(BankAccountsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.BankAccounts Obj)
            {
                Delete(Obj.BankAccountsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.BankAccounts Obj)
            {
                DeleteLogical(Obj.BankAccountsID);
            }
    	
            public void Delete(int BankAccountsID) 
    		{
    			this.Repository.Delete(BankAccountsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.BankAccounts MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.BankAccounts MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.BankAccounts Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.BankAccounts Insert(SilkeyERP.Model.BankAccounts MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.BankAccounts> Insert(List<SilkeyERP.Model.BankAccounts> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.BankAccounts MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.BankAccounts MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.BankAccounts MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.BankAccounts MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.BankAccounts MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class BuyPriceListController : NAGFwk.BL.IBaseController<Model.BuyPriceList>
    {
    
           private readonly SilkeyERP.Model.BuyPriceListRepository Repository;
    
            public BuyPriceListController()
            {
                    this.Repository = new Model.BuyPriceListRepository();
            }
    
    		public struct BuyPriceListRelatedEntities
            {
                			   
    			      public string Suppliers { get { return "Suppliers"; } }
    			  			   
    			      public string BuyPriceListDetails { get { return "BuyPriceListDetails"; } }
    			  			   
    			      public string Suppliers1 { get { return "Suppliers1"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.BuyPriceList GetBuyPriceListWithAllChilds(int BuyPriceListID) 
            {
    				 return this.Repository.GetBuyPriceListWithAllChilds(BuyPriceListID);
    		}
    			
            public SilkeyERP.Model.BuyPriceList GetBuyPriceList(int BuyPriceListID) 
            {
    		    return this.Repository.GetBuyPriceList(BuyPriceListID); 
    		}
    				public List<SilkeyERP.Model.BuyPriceList> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public BuyPriceList GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.BuyPriceList GetBuyPriceListWithSuppliers(int BuyPriceListID) 
    		{
    		    return this.Repository.GetBuyPriceListWithSuppliers(BuyPriceListID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.BuyPriceList GetBuyPriceListWithBuyPriceListDetails(int BuyPriceListID) 
    		{
    		    return this.Repository.GetBuyPriceListWithBuyPriceListDetails(BuyPriceListID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.BuyPriceList GetBuyPriceListWithSuppliers1(int BuyPriceListID) 
    		{
    		    return this.Repository.GetBuyPriceListWithSuppliers1(BuyPriceListID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.BuyPriceList Obj)
            {
                Delete(Obj.BuyPriceListID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.BuyPriceList Obj)
            {
                DeleteLogical(Obj.BuyPriceListID);
            }
    	
            public void Delete(int BuyPriceListID) 
    		{
    			this.Repository.Delete(BuyPriceListID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.BuyPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.BuyPriceList MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.BuyPriceList Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.BuyPriceList Insert(SilkeyERP.Model.BuyPriceList MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.BuyPriceList> Insert(List<SilkeyERP.Model.BuyPriceList> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.BuyPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.BuyPriceList MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.BuyPriceList MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.BuyPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.BuyPriceList MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class BuyPriceListDetailsController : NAGFwk.BL.IBaseController<Model.BuyPriceListDetails>
    {
    
           private readonly SilkeyERP.Model.BuyPriceListDetailsRepository Repository;
    
            public BuyPriceListDetailsController()
            {
                    this.Repository = new Model.BuyPriceListDetailsRepository();
            }
    
    		public struct BuyPriceListDetailsRelatedEntities
            {
                			   
    			      public string BuyPriceList { get { return "BuyPriceList"; } }
    			  			   
    			      public string Products { get { return "Products"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.BuyPriceListDetails GetBuyPriceListDetailsWithAllChilds(int BuyPriceListDetailsID) 
            {
    				 return this.Repository.GetBuyPriceListDetailsWithAllChilds(BuyPriceListDetailsID);
    		}
    			
            public SilkeyERP.Model.BuyPriceListDetails GetBuyPriceListDetails(int BuyPriceListDetailsID) 
            {
    		    return this.Repository.GetBuyPriceListDetails(BuyPriceListDetailsID); 
    		}
    				public List<SilkeyERP.Model.BuyPriceListDetails> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public BuyPriceListDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.BuyPriceListDetails GetBuyPriceListDetailsWithBuyPriceList(int BuyPriceListDetailsID) 
    		{
    		    return this.Repository.GetBuyPriceListDetailsWithBuyPriceList(BuyPriceListDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.BuyPriceListDetails GetBuyPriceListDetailsWithProducts(int BuyPriceListDetailsID) 
    		{
    		    return this.Repository.GetBuyPriceListDetailsWithProducts(BuyPriceListDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.BuyPriceListDetails GetBuyPriceListDetailsWithTax(int BuyPriceListDetailsID) 
    		{
    		    return this.Repository.GetBuyPriceListDetailsWithTax(BuyPriceListDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.BuyPriceListDetails Obj)
            {
                Delete(Obj.BuyPriceListDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.BuyPriceListDetails Obj)
            {
                DeleteLogical(Obj.BuyPriceListDetailsID);
            }
    	
            public void Delete(int BuyPriceListDetailsID) 
    		{
    			this.Repository.Delete(BuyPriceListDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.BuyPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.BuyPriceListDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.BuyPriceListDetails Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.BuyPriceListDetails Insert(SilkeyERP.Model.BuyPriceListDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.BuyPriceListDetails> Insert(List<SilkeyERP.Model.BuyPriceListDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.BuyPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.BuyPriceListDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.BuyPriceListDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.BuyPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.BuyPriceListDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class ChecksController : NAGFwk.BL.IBaseController<Model.Checks>
    {
    
           private readonly SilkeyERP.Model.ChecksRepository Repository;
    
            public ChecksController()
            {
                    this.Repository = new Model.ChecksRepository();
            }
    
    		public struct ChecksRelatedEntities
            {
                			   
    			      public string BankAccounts { get { return "BankAccounts"; } }
    			  			   
    			      public string GeneralPaymentSupplier { get { return "GeneralPaymentSupplier"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Checks GetChecksWithAllChilds(int CheckID) 
            {
    				 return this.Repository.GetChecksWithAllChilds(CheckID);
    		}
    			
            public SilkeyERP.Model.Checks GetChecks(int CheckID) 
            {
    		    return this.Repository.GetChecks(CheckID); 
    		}
    				public List<SilkeyERP.Model.Checks> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Checks GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Checks GetChecksWithBankAccounts(int CheckID) 
    		{
    		    return this.Repository.GetChecksWithBankAccounts(CheckID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Checks GetChecksWithGeneralPaymentSupplier(int CheckID) 
    		{
    		    return this.Repository.GetChecksWithGeneralPaymentSupplier(CheckID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Checks Obj)
            {
                Delete(Obj.CheckID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Checks Obj)
            {
                DeleteLogical(Obj.CheckID);
            }
    	
            public void Delete(int CheckID) 
    		{
    			this.Repository.Delete(CheckID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Checks MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Checks MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Checks Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Checks Insert(SilkeyERP.Model.Checks MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Checks> Insert(List<SilkeyERP.Model.Checks> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Checks MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Checks MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Checks MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Checks MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Checks MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CityController : NAGFwk.BL.IBaseController<Model.City>
    {
    
           private readonly SilkeyERP.Model.CityRepository Repository;
    
            public CityController()
            {
                    this.Repository = new Model.CityRepository();
            }
    
    		public struct CityRelatedEntities
            {
                			   
    			      public string Bank { get { return "Bank"; } }
    			  			   
    			      public string Province { get { return "Province"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.City GetCityWithAllChilds(int CityID) 
            {
    				 return this.Repository.GetCityWithAllChilds(CityID);
    		}
    			
            public SilkeyERP.Model.City GetCity(int CityID) 
            {
    		    return this.Repository.GetCity(CityID); 
    		}
    				public List<SilkeyERP.Model.City> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public City GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.City GetCityWithBank(int CityID) 
    		{
    		    return this.Repository.GetCityWithBank(CityID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.City GetCityWithProvince(int CityID) 
    		{
    		    return this.Repository.GetCityWithProvince(CityID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.City GetCityWithCustomer(int CityID) 
    		{
    		    return this.Repository.GetCityWithCustomer(CityID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.City GetCityWithSalesPerson(int CityID) 
    		{
    		    return this.Repository.GetCityWithSalesPerson(CityID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.City Obj)
            {
                Delete(Obj.CityID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.City Obj)
            {
                DeleteLogical(Obj.CityID);
            }
    	
            public void Delete(int CityID) 
    		{
    			this.Repository.Delete(CityID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.City MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.City MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.City Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.City Insert(SilkeyERP.Model.City MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.City> Insert(List<SilkeyERP.Model.City> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.City MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.City MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.City MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.City MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.City MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CountryController : NAGFwk.BL.IBaseController<Model.Country>
    {
    
           private readonly SilkeyERP.Model.CountryRepository Repository;
    
            public CountryController()
            {
                    this.Repository = new Model.CountryRepository();
            }
    
    		public struct CountryRelatedEntities
            {
                			   
    			      public string Province { get { return "Province"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Country GetCountryWithAllChilds(int CountryID) 
            {
    				 return this.Repository.GetCountryWithAllChilds(CountryID);
    		}
    			
            public SilkeyERP.Model.Country GetCountry(int CountryID) 
            {
    		    return this.Repository.GetCountry(CountryID); 
    		}
    				public List<SilkeyERP.Model.Country> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Country GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Country GetCountryWithProvince(int CountryID) 
    		{
    		    return this.Repository.GetCountryWithProvince(CountryID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Country Obj)
            {
                Delete(Obj.CountryID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Country Obj)
            {
                DeleteLogical(Obj.CountryID);
            }
    	
            public void Delete(int CountryID) 
    		{
    			this.Repository.Delete(CountryID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Country MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Country MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Country Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Country Insert(SilkeyERP.Model.Country MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Country> Insert(List<SilkeyERP.Model.Country> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Country MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Country MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Country MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Country MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Country MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CurrencyController : NAGFwk.BL.IBaseController<Model.Currency>
    {
    
           private readonly SilkeyERP.Model.CurrencyRepository Repository;
    
            public CurrencyController()
            {
                    this.Repository = new Model.CurrencyRepository();
            }
    
    		public struct CurrencyRelatedEntities
            {
                			   
    			      public string CurrencyConversion { get { return "CurrencyConversion"; } }
    			  			   
    			      public string CurrencyConversion1 { get { return "CurrencyConversion1"; } }
    			  			   
    			      public string PaymentMethod { get { return "PaymentMethod"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Currency GetCurrencyWithAllChilds(int CurrencyID) 
            {
    				 return this.Repository.GetCurrencyWithAllChilds(CurrencyID);
    		}
    			
            public SilkeyERP.Model.Currency GetCurrency(int CurrencyID) 
            {
    		    return this.Repository.GetCurrency(CurrencyID); 
    		}
    				public List<SilkeyERP.Model.Currency> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Currency GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Currency GetCurrencyWithCurrencyConversion(int CurrencyID) 
    		{
    		    return this.Repository.GetCurrencyWithCurrencyConversion(CurrencyID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Currency GetCurrencyWithCurrencyConversion1(int CurrencyID) 
    		{
    		    return this.Repository.GetCurrencyWithCurrencyConversion1(CurrencyID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Currency GetCurrencyWithPaymentMethod(int CurrencyID) 
    		{
    		    return this.Repository.GetCurrencyWithPaymentMethod(CurrencyID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Currency Obj)
            {
                Delete(Obj.CurrencyID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Currency Obj)
            {
                DeleteLogical(Obj.CurrencyID);
            }
    	
            public void Delete(int CurrencyID) 
    		{
    			this.Repository.Delete(CurrencyID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Currency MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Currency MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Currency Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Currency Insert(SilkeyERP.Model.Currency MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Currency> Insert(List<SilkeyERP.Model.Currency> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Currency MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Currency MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Currency MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Currency MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Currency MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CurrencyConversionController : NAGFwk.BL.IBaseController<Model.CurrencyConversion>
    {
    
           private readonly SilkeyERP.Model.CurrencyConversionRepository Repository;
    
            public CurrencyConversionController()
            {
                    this.Repository = new Model.CurrencyConversionRepository();
            }
    
    		public struct CurrencyConversionRelatedEntities
            {
                			   
    			      public string Currency { get { return "Currency"; } }
    			  			   
    			      public string Currency1 { get { return "Currency1"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.CurrencyConversion GetCurrencyConversionWithAllChilds(int ConversionID) 
            {
    				 return this.Repository.GetCurrencyConversionWithAllChilds(ConversionID);
    		}
    			
            public SilkeyERP.Model.CurrencyConversion GetCurrencyConversion(int ConversionID) 
            {
    		    return this.Repository.GetCurrencyConversion(ConversionID); 
    		}
    				public List<SilkeyERP.Model.CurrencyConversion> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public CurrencyConversion GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.CurrencyConversion GetCurrencyConversionWithCurrency(int ConversionID) 
    		{
    		    return this.Repository.GetCurrencyConversionWithCurrency(ConversionID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.CurrencyConversion GetCurrencyConversionWithCurrency1(int ConversionID) 
    		{
    		    return this.Repository.GetCurrencyConversionWithCurrency1(ConversionID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.CurrencyConversion Obj)
            {
                Delete(Obj.ConversionID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.CurrencyConversion Obj)
            {
                DeleteLogical(Obj.ConversionID);
            }
    	
            public void Delete(int ConversionID) 
    		{
    			this.Repository.Delete(ConversionID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.CurrencyConversion MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.CurrencyConversion MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.CurrencyConversion Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.CurrencyConversion Insert(SilkeyERP.Model.CurrencyConversion MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.CurrencyConversion> Insert(List<SilkeyERP.Model.CurrencyConversion> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.CurrencyConversion MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.CurrencyConversion MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.CurrencyConversion MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.CurrencyConversion MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.CurrencyConversion MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CustomerController : NAGFwk.BL.IBaseController<Model.Customer>
    {
    
           private readonly SilkeyERP.Model.CustomerRepository Repository;
    
            public CustomerController()
            {
                    this.Repository = new Model.CustomerRepository();
            }
    
    		public struct CustomerRelatedEntities
            {
                			   
    			      public string City { get { return "City"; } }
    			  			   
    			      public string PaymentMethod { get { return "PaymentMethod"; } }
    			  			   
    			      public string Sales { get { return "Sales"; } }
    			  			   
    			      public string SalesPriceListByCustomer { get { return "SalesPriceListByCustomer"; } }
    			  			   
    			      public string CustomerType { get { return "CustomerType"; } }
    			  			   
    			      public string SalesPriceList { get { return "SalesPriceList"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			  			   
    			      public string TaxFigure { get { return "TaxFigure"; } }
    			  			   
    			      public string Address { get { return "Address"; } }
    			  			   
    			      public string Email { get { return "Email"; } }
    			  			   
    			      public string Phones { get { return "Phones"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Customer GetCustomerWithAllChilds(int CustomerID) 
            {
    				 return this.Repository.GetCustomerWithAllChilds(CustomerID);
    		}
    			
            public SilkeyERP.Model.Customer GetCustomer(int CustomerID) 
            {
    		    return this.Repository.GetCustomer(CustomerID); 
    		}
    				public List<SilkeyERP.Model.Customer> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Customer GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Customer GetCustomerWithCity(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithCity(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithPaymentMethod(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithPaymentMethod(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithSales(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithSales(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithSalesPriceListByCustomer(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithSalesPriceListByCustomer(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithCustomerType(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithCustomerType(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithSalesPriceList(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithSalesPriceList(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithSalesPerson(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithSalesPerson(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithTaxFigure(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithTaxFigure(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithAddress(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithAddress(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithEmail(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithEmail(CustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Customer GetCustomerWithPhones(int CustomerID) 
    		{
    		    return this.Repository.GetCustomerWithPhones(CustomerID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Customer Obj)
            {
                Delete(Obj.CustomerID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Customer Obj)
            {
                DeleteLogical(Obj.CustomerID);
            }
    	
            public void Delete(int CustomerID) 
    		{
    			this.Repository.Delete(CustomerID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Customer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Customer MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Customer Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Customer Insert(SilkeyERP.Model.Customer MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Customer> Insert(List<SilkeyERP.Model.Customer> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Customer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Customer MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Customer MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Customer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Customer MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class CustomerTypeController : NAGFwk.BL.IBaseController<Model.CustomerType>
    {
    
           private readonly SilkeyERP.Model.CustomerTypeRepository Repository;
    
            public CustomerTypeController()
            {
                    this.Repository = new Model.CustomerTypeRepository();
            }
    
    		public struct CustomerTypeRelatedEntities
            {
                			   
    			      public string Customer { get { return "Customer"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.CustomerType GetCustomerTypeWithAllChilds(int CustomerTypeID) 
            {
    				 return this.Repository.GetCustomerTypeWithAllChilds(CustomerTypeID);
    		}
    			
            public SilkeyERP.Model.CustomerType GetCustomerType(int CustomerTypeID) 
            {
    		    return this.Repository.GetCustomerType(CustomerTypeID); 
    		}
    				public List<SilkeyERP.Model.CustomerType> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public CustomerType GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.CustomerType GetCustomerTypeWithCustomer(int CustomerTypeID) 
    		{
    		    return this.Repository.GetCustomerTypeWithCustomer(CustomerTypeID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.CustomerType Obj)
            {
                Delete(Obj.CustomerTypeID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.CustomerType Obj)
            {
                DeleteLogical(Obj.CustomerTypeID);
            }
    	
            public void Delete(int CustomerTypeID) 
    		{
    			this.Repository.Delete(CustomerTypeID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.CustomerType MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.CustomerType MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.CustomerType Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.CustomerType Insert(SilkeyERP.Model.CustomerType MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.CustomerType> Insert(List<SilkeyERP.Model.CustomerType> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.CustomerType MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.CustomerType MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.CustomerType MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.CustomerType MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.CustomerType MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class DailyCashController : NAGFwk.BL.IBaseController<Model.DailyCash>
    {
    
           private readonly SilkeyERP.Model.DailyCashRepository Repository;
    
            public DailyCashController()
            {
                    this.Repository = new Model.DailyCashRepository();
            }
    
    		public struct DailyCashRelatedEntities
            {
                			   
    			      public string DailyCashDetails { get { return "DailyCashDetails"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.DailyCash GetDailyCashWithAllChilds(int DailyCashID) 
            {
    				 return this.Repository.GetDailyCashWithAllChilds(DailyCashID);
    		}
    			
            public SilkeyERP.Model.DailyCash GetDailyCash(int DailyCashID) 
            {
    		    return this.Repository.GetDailyCash(DailyCashID); 
    		}
    				public List<SilkeyERP.Model.DailyCash> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public DailyCash GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.DailyCash GetDailyCashWithDailyCashDetails(int DailyCashID) 
    		{
    		    return this.Repository.GetDailyCashWithDailyCashDetails(DailyCashID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.DailyCash Obj)
            {
                Delete(Obj.DailyCashID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.DailyCash Obj)
            {
                DeleteLogical(Obj.DailyCashID);
            }
    	
            public void Delete(int DailyCashID) 
    		{
    			this.Repository.Delete(DailyCashID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.DailyCash MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.DailyCash MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.DailyCash Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.DailyCash Insert(SilkeyERP.Model.DailyCash MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.DailyCash> Insert(List<SilkeyERP.Model.DailyCash> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.DailyCash MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.DailyCash MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.DailyCash MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.DailyCash MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.DailyCash MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class DailyCashDetailsController : NAGFwk.BL.IBaseController<Model.DailyCashDetails>
    {
    
           private readonly SilkeyERP.Model.DailyCashDetailsRepository Repository;
    
            public DailyCashDetailsController()
            {
                    this.Repository = new Model.DailyCashDetailsRepository();
            }
    
    		public struct DailyCashDetailsRelatedEntities
            {
                			   
    			      public string DailyCash { get { return "DailyCash"; } }
    			  			   
    			      public string PaymentMethod { get { return "PaymentMethod"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.DailyCashDetails GetDailyCashDetailsWithAllChilds(int DailyCashDetailsID) 
            {
    				 return this.Repository.GetDailyCashDetailsWithAllChilds(DailyCashDetailsID);
    		}
    			
            public SilkeyERP.Model.DailyCashDetails GetDailyCashDetails(int DailyCashDetailsID) 
            {
    		    return this.Repository.GetDailyCashDetails(DailyCashDetailsID); 
    		}
    				public List<SilkeyERP.Model.DailyCashDetails> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public DailyCashDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.DailyCashDetails GetDailyCashDetailsWithDailyCash(int DailyCashDetailsID) 
    		{
    		    return this.Repository.GetDailyCashDetailsWithDailyCash(DailyCashDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.DailyCashDetails GetDailyCashDetailsWithPaymentMethod(int DailyCashDetailsID) 
    		{
    		    return this.Repository.GetDailyCashDetailsWithPaymentMethod(DailyCashDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.DailyCashDetails Obj)
            {
                Delete(Obj.DailyCashDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.DailyCashDetails Obj)
            {
                DeleteLogical(Obj.DailyCashDetailsID);
            }
    	
            public void Delete(int DailyCashDetailsID) 
    		{
    			this.Repository.Delete(DailyCashDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.DailyCashDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.DailyCashDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.DailyCashDetails Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.DailyCashDetails Insert(SilkeyERP.Model.DailyCashDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.DailyCashDetails> Insert(List<SilkeyERP.Model.DailyCashDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.DailyCashDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.DailyCashDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.DailyCashDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.DailyCashDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.DailyCashDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class EmailController : NAGFwk.BL.IBaseController<Model.Email>
    {
    
           private readonly SilkeyERP.Model.EmailRepository Repository;
    
            public EmailController()
            {
                    this.Repository = new Model.EmailRepository();
            }
    
    		public struct EmailRelatedEntities
            {
                			   
    			      public string Bank { get { return "Bank"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			  			   
    			      public string Suppliers { get { return "Suppliers"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Email GetEmailWithAllChilds(int EmailID) 
            {
    				 return this.Repository.GetEmailWithAllChilds(EmailID);
    		}
    			
            public SilkeyERP.Model.Email GetEmail(int EmailID) 
            {
    		    return this.Repository.GetEmail(EmailID); 
    		}
    				public List<SilkeyERP.Model.Email> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Email GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Email GetEmailWithBank(int EmailID) 
    		{
    		    return this.Repository.GetEmailWithBank(EmailID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Email GetEmailWithCustomer(int EmailID) 
    		{
    		    return this.Repository.GetEmailWithCustomer(EmailID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Email GetEmailWithSalesPerson(int EmailID) 
    		{
    		    return this.Repository.GetEmailWithSalesPerson(EmailID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Email GetEmailWithSuppliers(int EmailID) 
    		{
    		    return this.Repository.GetEmailWithSuppliers(EmailID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Email Obj)
            {
                Delete(Obj.EmailID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Email Obj)
            {
                DeleteLogical(Obj.EmailID);
            }
    	
            public void Delete(int EmailID) 
    		{
    			this.Repository.Delete(EmailID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Email MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Email MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Email Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Email Insert(SilkeyERP.Model.Email MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Email> Insert(List<SilkeyERP.Model.Email> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Email MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Email MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Email MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Email MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Email MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GeneralPaymentSupplierController : NAGFwk.BL.IBaseController<Model.GeneralPaymentSupplier>
    {
    
           private readonly SilkeyERP.Model.GeneralPaymentSupplierRepository Repository;
    
            public GeneralPaymentSupplierController()
            {
                    this.Repository = new Model.GeneralPaymentSupplierRepository();
            }
    
    		public struct GeneralPaymentSupplierRelatedEntities
            {
                			   
    			      public string Checks { get { return "Checks"; } }
    			  			   
    			      public string PaymentMethod { get { return "PaymentMethod"; } }
    			  			   
    			      public string PaymentSupplier { get { return "PaymentSupplier"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.GeneralPaymentSupplier GetGeneralPaymentSupplierWithAllChilds(int GeneralPaymentSupplierID) 
            {
    				 return this.Repository.GetGeneralPaymentSupplierWithAllChilds(GeneralPaymentSupplierID);
    		}
    			
            public SilkeyERP.Model.GeneralPaymentSupplier GetGeneralPaymentSupplier(int GeneralPaymentSupplierID) 
            {
    		    return this.Repository.GetGeneralPaymentSupplier(GeneralPaymentSupplierID); 
    		}
    				public List<SilkeyERP.Model.GeneralPaymentSupplier> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public GeneralPaymentSupplier GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.GeneralPaymentSupplier GetGeneralPaymentSupplierWithChecks(int GeneralPaymentSupplierID) 
    		{
    		    return this.Repository.GetGeneralPaymentSupplierWithChecks(GeneralPaymentSupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.GeneralPaymentSupplier GetGeneralPaymentSupplierWithPaymentMethod(int GeneralPaymentSupplierID) 
    		{
    		    return this.Repository.GetGeneralPaymentSupplierWithPaymentMethod(GeneralPaymentSupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.GeneralPaymentSupplier GetGeneralPaymentSupplierWithPaymentSupplier(int GeneralPaymentSupplierID) 
    		{
    		    return this.Repository.GetGeneralPaymentSupplierWithPaymentSupplier(GeneralPaymentSupplierID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.GeneralPaymentSupplier Obj)
            {
                Delete(Obj.GeneralPaymentSupplierID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.GeneralPaymentSupplier Obj)
            {
                DeleteLogical(Obj.GeneralPaymentSupplierID);
            }
    	
            public void Delete(int GeneralPaymentSupplierID) 
    		{
    			this.Repository.Delete(GeneralPaymentSupplierID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.GeneralPaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.GeneralPaymentSupplier MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.GeneralPaymentSupplier Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.GeneralPaymentSupplier Insert(SilkeyERP.Model.GeneralPaymentSupplier MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.GeneralPaymentSupplier> Insert(List<SilkeyERP.Model.GeneralPaymentSupplier> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.GeneralPaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.GeneralPaymentSupplier MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.GeneralPaymentSupplier MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.GeneralPaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.GeneralPaymentSupplier MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class PaymentMethodController : NAGFwk.BL.IBaseController<Model.PaymentMethod>
    {
    
           private readonly SilkeyERP.Model.PaymentMethodRepository Repository;
    
            public PaymentMethodController()
            {
                    this.Repository = new Model.PaymentMethodRepository();
            }
    
    		public struct PaymentMethodRelatedEntities
            {
                			   
    			      public string Currency { get { return "Currency"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string DailyCashDetails { get { return "DailyCashDetails"; } }
    			  			   
    			      public string GeneralPaymentSupplier { get { return "GeneralPaymentSupplier"; } }
    			  			   
    			      public string PaymentMethodDetails { get { return "PaymentMethodDetails"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithAllChilds(int PaymentMethodID) 
            {
    				 return this.Repository.GetPaymentMethodWithAllChilds(PaymentMethodID);
    		}
    			
            public SilkeyERP.Model.PaymentMethod GetPaymentMethod(int PaymentMethodID) 
            {
    		    return this.Repository.GetPaymentMethod(PaymentMethodID); 
    		}
    				public List<SilkeyERP.Model.PaymentMethod> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public PaymentMethod GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithCurrency(int PaymentMethodID) 
    		{
    		    return this.Repository.GetPaymentMethodWithCurrency(PaymentMethodID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithCustomer(int PaymentMethodID) 
    		{
    		    return this.Repository.GetPaymentMethodWithCustomer(PaymentMethodID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithDailyCashDetails(int PaymentMethodID) 
    		{
    		    return this.Repository.GetPaymentMethodWithDailyCashDetails(PaymentMethodID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithGeneralPaymentSupplier(int PaymentMethodID) 
    		{
    		    return this.Repository.GetPaymentMethodWithGeneralPaymentSupplier(PaymentMethodID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentMethod GetPaymentMethodWithPaymentMethodDetails(int PaymentMethodID) 
    		{
    		    return this.Repository.GetPaymentMethodWithPaymentMethodDetails(PaymentMethodID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.PaymentMethod Obj)
            {
                Delete(Obj.PaymentMethodID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.PaymentMethod Obj)
            {
                DeleteLogical(Obj.PaymentMethodID);
            }
    	
            public void Delete(int PaymentMethodID) 
    		{
    			this.Repository.Delete(PaymentMethodID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.PaymentMethod MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.PaymentMethod MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.PaymentMethod Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.PaymentMethod Insert(SilkeyERP.Model.PaymentMethod MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.PaymentMethod> Insert(List<SilkeyERP.Model.PaymentMethod> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.PaymentMethod MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.PaymentMethod MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.PaymentMethod MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.PaymentMethod MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.PaymentMethod MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class PaymentMethodDetailsController : NAGFwk.BL.IBaseController<Model.PaymentMethodDetails>
    {
    
           private readonly SilkeyERP.Model.PaymentMethodDetailsRepository Repository;
    
            public PaymentMethodDetailsController()
            {
                    this.Repository = new Model.PaymentMethodDetailsRepository();
            }
    
    		public struct PaymentMethodDetailsRelatedEntities
            {
                			   
    			      public string PaymentMethod { get { return "PaymentMethod"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.PaymentMethodDetails GetPaymentMethodDetailsWithAllChilds(int PaymentMethodDetailsID) 
            {
    				 return this.Repository.GetPaymentMethodDetailsWithAllChilds(PaymentMethodDetailsID);
    		}
    			
            public SilkeyERP.Model.PaymentMethodDetails GetPaymentMethodDetails(int PaymentMethodDetailsID) 
            {
    		    return this.Repository.GetPaymentMethodDetails(PaymentMethodDetailsID); 
    		}
    				public List<SilkeyERP.Model.PaymentMethodDetails> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public PaymentMethodDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.PaymentMethodDetails GetPaymentMethodDetailsWithPaymentMethod(int PaymentMethodDetailsID) 
    		{
    		    return this.Repository.GetPaymentMethodDetailsWithPaymentMethod(PaymentMethodDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.PaymentMethodDetails Obj)
            {
                Delete(Obj.PaymentMethodDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.PaymentMethodDetails Obj)
            {
                DeleteLogical(Obj.PaymentMethodDetailsID);
            }
    	
            public void Delete(int PaymentMethodDetailsID) 
    		{
    			this.Repository.Delete(PaymentMethodDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.PaymentMethodDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.PaymentMethodDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.PaymentMethodDetails Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.PaymentMethodDetails Insert(SilkeyERP.Model.PaymentMethodDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.PaymentMethodDetails> Insert(List<SilkeyERP.Model.PaymentMethodDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.PaymentMethodDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.PaymentMethodDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.PaymentMethodDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.PaymentMethodDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.PaymentMethodDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class PaymentSupplierController : NAGFwk.BL.IBaseController<Model.PaymentSupplier>
    {
    
           private readonly SilkeyERP.Model.PaymentSupplierRepository Repository;
    
            public PaymentSupplierController()
            {
                    this.Repository = new Model.PaymentSupplierRepository();
            }
    
    		public struct PaymentSupplierRelatedEntities
            {
                			   
    			      public string GeneralPaymentSupplier { get { return "GeneralPaymentSupplier"; } }
    			  			   
    			      public string Suppliers { get { return "Suppliers"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			  			   
    			      public string PaymentSupplierDetails { get { return "PaymentSupplierDetails"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.PaymentSupplier GetPaymentSupplierWithAllChilds(int PaymentSupplierID) 
            {
    				 return this.Repository.GetPaymentSupplierWithAllChilds(PaymentSupplierID);
    		}
    			
            public SilkeyERP.Model.PaymentSupplier GetPaymentSupplier(int PaymentSupplierID) 
            {
    		    return this.Repository.GetPaymentSupplier(PaymentSupplierID); 
    		}
    				public List<SilkeyERP.Model.PaymentSupplier> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public PaymentSupplier GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.PaymentSupplier GetPaymentSupplierWithGeneralPaymentSupplier(int PaymentSupplierID) 
    		{
    		    return this.Repository.GetPaymentSupplierWithGeneralPaymentSupplier(PaymentSupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentSupplier GetPaymentSupplierWithSuppliers(int PaymentSupplierID) 
    		{
    		    return this.Repository.GetPaymentSupplierWithSuppliers(PaymentSupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentSupplier GetPaymentSupplierWithTax(int PaymentSupplierID) 
    		{
    		    return this.Repository.GetPaymentSupplierWithTax(PaymentSupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentSupplier GetPaymentSupplierWithPaymentSupplierDetails(int PaymentSupplierID) 
    		{
    		    return this.Repository.GetPaymentSupplierWithPaymentSupplierDetails(PaymentSupplierID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.PaymentSupplier Obj)
            {
                Delete(Obj.PaymentSupplierID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.PaymentSupplier Obj)
            {
                DeleteLogical(Obj.PaymentSupplierID);
            }
    	
            public void Delete(int PaymentSupplierID) 
    		{
    			this.Repository.Delete(PaymentSupplierID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.PaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.PaymentSupplier MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.PaymentSupplier Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.PaymentSupplier Insert(SilkeyERP.Model.PaymentSupplier MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.PaymentSupplier> Insert(List<SilkeyERP.Model.PaymentSupplier> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.PaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.PaymentSupplier MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.PaymentSupplier MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.PaymentSupplier MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.PaymentSupplier MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class PaymentSupplierDetailsController : NAGFwk.BL.IBaseController<Model.PaymentSupplierDetails>
    {
    
           private readonly SilkeyERP.Model.PaymentSupplierDetailsRepository Repository;
    
            public PaymentSupplierDetailsController()
            {
                    this.Repository = new Model.PaymentSupplierDetailsRepository();
            }
    
    		public struct PaymentSupplierDetailsRelatedEntities
            {
                			   
    			      public string PaymentSupplier { get { return "PaymentSupplier"; } }
    			  			   
    			      public string Products { get { return "Products"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.PaymentSupplierDetails GetPaymentSupplierDetailsWithAllChilds(int PaymentSupplierDetailsID) 
            {
    				 return this.Repository.GetPaymentSupplierDetailsWithAllChilds(PaymentSupplierDetailsID);
    		}
    			
            public SilkeyERP.Model.PaymentSupplierDetails GetPaymentSupplierDetails(int PaymentSupplierDetailsID) 
            {
    		    return this.Repository.GetPaymentSupplierDetails(PaymentSupplierDetailsID); 
    		}
    				public List<SilkeyERP.Model.PaymentSupplierDetails> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public PaymentSupplierDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.PaymentSupplierDetails GetPaymentSupplierDetailsWithPaymentSupplier(int PaymentSupplierDetailsID) 
    		{
    		    return this.Repository.GetPaymentSupplierDetailsWithPaymentSupplier(PaymentSupplierDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentSupplierDetails GetPaymentSupplierDetailsWithProducts(int PaymentSupplierDetailsID) 
    		{
    		    return this.Repository.GetPaymentSupplierDetailsWithProducts(PaymentSupplierDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.PaymentSupplierDetails GetPaymentSupplierDetailsWithTax(int PaymentSupplierDetailsID) 
    		{
    		    return this.Repository.GetPaymentSupplierDetailsWithTax(PaymentSupplierDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.PaymentSupplierDetails Obj)
            {
                Delete(Obj.PaymentSupplierDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.PaymentSupplierDetails Obj)
            {
                DeleteLogical(Obj.PaymentSupplierDetailsID);
            }
    	
            public void Delete(int PaymentSupplierDetailsID) 
    		{
    			this.Repository.Delete(PaymentSupplierDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.PaymentSupplierDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.PaymentSupplierDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.PaymentSupplierDetails Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.PaymentSupplierDetails Insert(SilkeyERP.Model.PaymentSupplierDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.PaymentSupplierDetails> Insert(List<SilkeyERP.Model.PaymentSupplierDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.PaymentSupplierDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.PaymentSupplierDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.PaymentSupplierDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.PaymentSupplierDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.PaymentSupplierDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class PhonesController : NAGFwk.BL.IBaseController<Model.Phones>
    {
    
           private readonly SilkeyERP.Model.PhonesRepository Repository;
    
            public PhonesController()
            {
                    this.Repository = new Model.PhonesRepository();
            }
    
    		public struct PhonesRelatedEntities
            {
                			   
    			      public string Bank { get { return "Bank"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			  			   
    			      public string Suppliers { get { return "Suppliers"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Phones GetPhonesWithAllChilds(int PhoneID) 
            {
    				 return this.Repository.GetPhonesWithAllChilds(PhoneID);
    		}
    			
            public SilkeyERP.Model.Phones GetPhones(int PhoneID) 
            {
    		    return this.Repository.GetPhones(PhoneID); 
    		}
    				public List<SilkeyERP.Model.Phones> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Phones GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Phones GetPhonesWithBank(int PhoneID) 
    		{
    		    return this.Repository.GetPhonesWithBank(PhoneID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Phones GetPhonesWithCustomer(int PhoneID) 
    		{
    		    return this.Repository.GetPhonesWithCustomer(PhoneID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Phones GetPhonesWithSalesPerson(int PhoneID) 
    		{
    		    return this.Repository.GetPhonesWithSalesPerson(PhoneID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Phones GetPhonesWithSuppliers(int PhoneID) 
    		{
    		    return this.Repository.GetPhonesWithSuppliers(PhoneID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Phones Obj)
            {
                Delete(Obj.PhoneID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Phones Obj)
            {
                DeleteLogical(Obj.PhoneID);
            }
    	
            public void Delete(int PhoneID) 
    		{
    			this.Repository.Delete(PhoneID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Phones MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Phones MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Phones Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Phones Insert(SilkeyERP.Model.Phones MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Phones> Insert(List<SilkeyERP.Model.Phones> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Phones MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Phones MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Phones MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Phones MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Phones MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class ProductsController : NAGFwk.BL.IBaseController<Model.Products>
    {
    
           private readonly SilkeyERP.Model.ProductsRepository Repository;
    
            public ProductsController()
            {
                    this.Repository = new Model.ProductsRepository();
            }
    
    		public struct ProductsRelatedEntities
            {
                			   
    			      public string BuyPriceListDetails { get { return "BuyPriceListDetails"; } }
    			  			   
    			      public string PaymentSupplierDetails { get { return "PaymentSupplierDetails"; } }
    			  			   
    			      public string SalesPriceListDetails { get { return "SalesPriceListDetails"; } }
    			  			   
    			      public string SalesDetails { get { return "SalesDetails"; } }
    			  			   
    			      public string SalesPriceListByCustomer { get { return "SalesPriceListByCustomer"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Products GetProductsWithAllChilds(int ProductID) 
            {
    				 return this.Repository.GetProductsWithAllChilds(ProductID);
    		}
    			
            public SilkeyERP.Model.Products GetProducts(int ProductID) 
            {
    		    return this.Repository.GetProducts(ProductID); 
    		}
    				public List<SilkeyERP.Model.Products> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Products GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Products GetProductsWithBuyPriceListDetails(int ProductID) 
    		{
    		    return this.Repository.GetProductsWithBuyPriceListDetails(ProductID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Products GetProductsWithPaymentSupplierDetails(int ProductID) 
    		{
    		    return this.Repository.GetProductsWithPaymentSupplierDetails(ProductID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Products GetProductsWithSalesPriceListDetails(int ProductID) 
    		{
    		    return this.Repository.GetProductsWithSalesPriceListDetails(ProductID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Products GetProductsWithSalesDetails(int ProductID) 
    		{
    		    return this.Repository.GetProductsWithSalesDetails(ProductID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Products GetProductsWithSalesPriceListByCustomer(int ProductID) 
    		{
    		    return this.Repository.GetProductsWithSalesPriceListByCustomer(ProductID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Products Obj)
            {
                Delete(Obj.ProductID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Products Obj)
            {
                DeleteLogical(Obj.ProductID);
            }
    	
            public void Delete(int ProductID) 
    		{
    			this.Repository.Delete(ProductID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Products MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Products MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Products Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Products Insert(SilkeyERP.Model.Products MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Products> Insert(List<SilkeyERP.Model.Products> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Products MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Products MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Products MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Products MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Products MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class ProvinceController : NAGFwk.BL.IBaseController<Model.Province>
    {
    
           private readonly SilkeyERP.Model.ProvinceRepository Repository;
    
            public ProvinceController()
            {
                    this.Repository = new Model.ProvinceRepository();
            }
    
    		public struct ProvinceRelatedEntities
            {
                			   
    			      public string City { get { return "City"; } }
    			  			   
    			      public string Country { get { return "Country"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Province GetProvinceWithAllChilds(int ProvinceID) 
            {
    				 return this.Repository.GetProvinceWithAllChilds(ProvinceID);
    		}
    			
            public SilkeyERP.Model.Province GetProvince(int ProvinceID) 
            {
    		    return this.Repository.GetProvince(ProvinceID); 
    		}
    				public List<SilkeyERP.Model.Province> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Province GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Province GetProvinceWithCity(int ProvinceID) 
    		{
    		    return this.Repository.GetProvinceWithCity(ProvinceID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Province GetProvinceWithCountry(int ProvinceID) 
    		{
    		    return this.Repository.GetProvinceWithCountry(ProvinceID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Province Obj)
            {
                Delete(Obj.ProvinceID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Province Obj)
            {
                DeleteLogical(Obj.ProvinceID);
            }
    	
            public void Delete(int ProvinceID) 
    		{
    			this.Repository.Delete(ProvinceID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Province MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Province MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Province Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Province Insert(SilkeyERP.Model.Province MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Province> Insert(List<SilkeyERP.Model.Province> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Province MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Province MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Province MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Province MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Province MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesController : NAGFwk.BL.IBaseController<Model.Sales>
    {
    
           private readonly SilkeyERP.Model.SalesRepository Repository;
    
            public SalesController()
            {
                    this.Repository = new Model.SalesRepository();
            }
    
    		public struct SalesRelatedEntities
            {
                			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			  			   
    			      public string SalesPriceList { get { return "SalesPriceList"; } }
    			  			   
    			      public string SalesStatus { get { return "SalesStatus"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			  			   
    			      public string SalesDetails { get { return "SalesDetails"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Sales GetSalesWithAllChilds(int SalesID) 
            {
    				 return this.Repository.GetSalesWithAllChilds(SalesID);
    		}
    			
            public SilkeyERP.Model.Sales GetSales(int SalesID) 
            {
    		    return this.Repository.GetSales(SalesID); 
    		}
    				public List<SilkeyERP.Model.Sales> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Sales GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Sales GetSalesWithCustomer(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithCustomer(SalesID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Sales GetSalesWithSalesPerson(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithSalesPerson(SalesID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Sales GetSalesWithSalesPriceList(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithSalesPriceList(SalesID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Sales GetSalesWithSalesStatus(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithSalesStatus(SalesID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Sales GetSalesWithTax(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithTax(SalesID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Sales GetSalesWithSalesDetails(int SalesID) 
    		{
    		    return this.Repository.GetSalesWithSalesDetails(SalesID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Sales Obj)
            {
                Delete(Obj.SalesID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Sales Obj)
            {
                DeleteLogical(Obj.SalesID);
            }
    	
            public void Delete(int SalesID) 
    		{
    			this.Repository.Delete(SalesID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Sales MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Sales MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Sales Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Sales Insert(SilkeyERP.Model.Sales MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Sales> Insert(List<SilkeyERP.Model.Sales> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Sales MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Sales MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Sales MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Sales MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Sales MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesDetailsController : NAGFwk.BL.IBaseController<Model.SalesDetails>
    {
    
           private readonly SilkeyERP.Model.SalesDetailsRepository Repository;
    
            public SalesDetailsController()
            {
                    this.Repository = new Model.SalesDetailsRepository();
            }
    
    		public struct SalesDetailsRelatedEntities
            {
                			   
    			      public string Products { get { return "Products"; } }
    			  			   
    			      public string Sales { get { return "Sales"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesDetails GetSalesDetailsWithAllChilds(int SalesDetailsID) 
            {
    				 return this.Repository.GetSalesDetailsWithAllChilds(SalesDetailsID);
    		}
    			
            public SilkeyERP.Model.SalesDetails GetSalesDetails(int SalesDetailsID) 
            {
    		    return this.Repository.GetSalesDetails(SalesDetailsID); 
    		}
    				public List<SilkeyERP.Model.SalesDetails> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public SalesDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesDetails GetSalesDetailsWithProducts(int SalesDetailsID) 
    		{
    		    return this.Repository.GetSalesDetailsWithProducts(SalesDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesDetails GetSalesDetailsWithSales(int SalesDetailsID) 
    		{
    		    return this.Repository.GetSalesDetailsWithSales(SalesDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesDetails GetSalesDetailsWithTax(int SalesDetailsID) 
    		{
    		    return this.Repository.GetSalesDetailsWithTax(SalesDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesDetails Obj)
            {
                Delete(Obj.SalesDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesDetails Obj)
            {
                DeleteLogical(Obj.SalesDetailsID);
            }
    	
            public void Delete(int SalesDetailsID) 
    		{
    			this.Repository.Delete(SalesDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.SalesDetails Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesDetails Insert(SilkeyERP.Model.SalesDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesDetails> Insert(List<SilkeyERP.Model.SalesDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesPersonController : NAGFwk.BL.IBaseController<Model.SalesPerson>
    {
    
           private readonly SilkeyERP.Model.SalesPersonRepository Repository;
    
            public SalesPersonController()
            {
                    this.Repository = new Model.SalesPersonRepository();
            }
    
    		public struct SalesPersonRelatedEntities
            {
                			   
    			      public string City { get { return "City"; } }
    			  			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string Sales { get { return "Sales"; } }
    			  			   
    			      public string Address { get { return "Address"; } }
    			  			   
    			      public string Email { get { return "Email"; } }
    			  			   
    			      public string Phones { get { return "Phones"; } }
    			  			   
    			      public string SalesPriceList { get { return "SalesPriceList"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesPerson GetSalesPersonWithAllChilds(int SalesPersonID) 
            {
    				 return this.Repository.GetSalesPersonWithAllChilds(SalesPersonID);
    		}
    			
            public SilkeyERP.Model.SalesPerson GetSalesPerson(int SalesPersonID) 
            {
    		    return this.Repository.GetSalesPerson(SalesPersonID); 
    		}
    				public List<SilkeyERP.Model.SalesPerson> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public SalesPerson GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithCity(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithCity(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithCustomer(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithCustomer(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithSales(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithSales(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithAddress(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithAddress(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithEmail(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithEmail(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithPhones(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithPhones(SalesPersonID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPerson GetSalesPersonWithSalesPriceList(int SalesPersonID) 
    		{
    		    return this.Repository.GetSalesPersonWithSalesPriceList(SalesPersonID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesPerson Obj)
            {
                Delete(Obj.SalesPersonID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesPerson Obj)
            {
                DeleteLogical(Obj.SalesPersonID);
            }
    	
            public void Delete(int SalesPersonID) 
    		{
    			this.Repository.Delete(SalesPersonID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesPerson MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesPerson MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.SalesPerson Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesPerson Insert(SilkeyERP.Model.SalesPerson MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesPerson> Insert(List<SilkeyERP.Model.SalesPerson> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesPerson MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesPerson MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesPerson MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesPerson MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesPerson MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesPriceListController : NAGFwk.BL.IBaseController<Model.SalesPriceList>
    {
    
           private readonly SilkeyERP.Model.SalesPriceListRepository Repository;
    
            public SalesPriceListController()
            {
                    this.Repository = new Model.SalesPriceListRepository();
            }
    
    		public struct SalesPriceListRelatedEntities
            {
                			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string Sales { get { return "Sales"; } }
    			  			   
    			      public string SalesPriceListDetails { get { return "SalesPriceListDetails"; } }
    			  			   
    			      public string SalesPerson { get { return "SalesPerson"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesPriceList GetSalesPriceListWithAllChilds(int SalesPriceListID) 
            {
    				 return this.Repository.GetSalesPriceListWithAllChilds(SalesPriceListID);
    		}
    			
            public SilkeyERP.Model.SalesPriceList GetSalesPriceList(int SalesPriceListID) 
            {
    		    return this.Repository.GetSalesPriceList(SalesPriceListID); 
    		}
    				public List<SilkeyERP.Model.SalesPriceList> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public SalesPriceList GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesPriceList GetSalesPriceListWithCustomer(int SalesPriceListID) 
    		{
    		    return this.Repository.GetSalesPriceListWithCustomer(SalesPriceListID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceList GetSalesPriceListWithSales(int SalesPriceListID) 
    		{
    		    return this.Repository.GetSalesPriceListWithSales(SalesPriceListID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceList GetSalesPriceListWithSalesPriceListDetails(int SalesPriceListID) 
    		{
    		    return this.Repository.GetSalesPriceListWithSalesPriceListDetails(SalesPriceListID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceList GetSalesPriceListWithSalesPerson(int SalesPriceListID) 
    		{
    		    return this.Repository.GetSalesPriceListWithSalesPerson(SalesPriceListID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesPriceList Obj)
            {
                Delete(Obj.SalesPriceListID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesPriceList Obj)
            {
                DeleteLogical(Obj.SalesPriceListID);
            }
    	
            public void Delete(int SalesPriceListID) 
    		{
    			this.Repository.Delete(SalesPriceListID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesPriceList MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.SalesPriceList Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesPriceList Insert(SilkeyERP.Model.SalesPriceList MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesPriceList> Insert(List<SilkeyERP.Model.SalesPriceList> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesPriceList MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesPriceList MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesPriceList MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesPriceList MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesPriceListByCustomerController : NAGFwk.BL.IBaseController<Model.SalesPriceListByCustomer>
    {
    
           private readonly SilkeyERP.Model.SalesPriceListByCustomerRepository Repository;
    
            public SalesPriceListByCustomerController()
            {
                    this.Repository = new Model.SalesPriceListByCustomerRepository();
            }
    
    		public struct SalesPriceListByCustomerRelatedEntities
            {
                			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string Products { get { return "Products"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesPriceListByCustomer GetSalesPriceListByCustomerWithAllChilds(int SalesPriceListByCustomerID) 
            {
    				 return this.Repository.GetSalesPriceListByCustomerWithAllChilds(SalesPriceListByCustomerID);
    		}
    			
            public SilkeyERP.Model.SalesPriceListByCustomer GetSalesPriceListByCustomer(int SalesPriceListByCustomerID) 
            {
    		    return this.Repository.GetSalesPriceListByCustomer(SalesPriceListByCustomerID); 
    		}
    				public List<SilkeyERP.Model.SalesPriceListByCustomer> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public SalesPriceListByCustomer GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesPriceListByCustomer GetSalesPriceListByCustomerWithCustomer(int SalesPriceListByCustomerID) 
    		{
    		    return this.Repository.GetSalesPriceListByCustomerWithCustomer(SalesPriceListByCustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceListByCustomer GetSalesPriceListByCustomerWithProducts(int SalesPriceListByCustomerID) 
    		{
    		    return this.Repository.GetSalesPriceListByCustomerWithProducts(SalesPriceListByCustomerID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceListByCustomer GetSalesPriceListByCustomerWithTax(int SalesPriceListByCustomerID) 
    		{
    		    return this.Repository.GetSalesPriceListByCustomerWithTax(SalesPriceListByCustomerID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesPriceListByCustomer Obj)
            {
                Delete(Obj.SalesPriceListByCustomerID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesPriceListByCustomer Obj)
            {
                DeleteLogical(Obj.SalesPriceListByCustomerID);
            }
    	
            public void Delete(int SalesPriceListByCustomerID) 
    		{
    			this.Repository.Delete(SalesPriceListByCustomerID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesPriceListByCustomer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesPriceListByCustomer MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.SalesPriceListByCustomer Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesPriceListByCustomer Insert(SilkeyERP.Model.SalesPriceListByCustomer MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesPriceListByCustomer> Insert(List<SilkeyERP.Model.SalesPriceListByCustomer> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesPriceListByCustomer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesPriceListByCustomer MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesPriceListByCustomer MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesPriceListByCustomer MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesPriceListByCustomer MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesPriceListDetailsController : NAGFwk.BL.IBaseController<Model.SalesPriceListDetails>
    {
    
           private readonly SilkeyERP.Model.SalesPriceListDetailsRepository Repository;
    
            public SalesPriceListDetailsController()
            {
                    this.Repository = new Model.SalesPriceListDetailsRepository();
            }
    
    		public struct SalesPriceListDetailsRelatedEntities
            {
                			   
    			      public string Products { get { return "Products"; } }
    			  			   
    			      public string SalesPriceList { get { return "SalesPriceList"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesPriceListDetails GetSalesPriceListDetailsWithAllChilds(int SalesPriceListDetailsID) 
            {
    				 return this.Repository.GetSalesPriceListDetailsWithAllChilds(SalesPriceListDetailsID);
    		}
    			
            public SilkeyERP.Model.SalesPriceListDetails GetSalesPriceListDetails(int SalesPriceListDetailsID) 
            {
    		    return this.Repository.GetSalesPriceListDetails(SalesPriceListDetailsID); 
    		}
    				public List<SilkeyERP.Model.SalesPriceListDetails> GetAll() 
            {
    		    return this.Repository.GetAll().ToList();
    		}
    				  public SalesPriceListDetails GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesPriceListDetails GetSalesPriceListDetailsWithProducts(int SalesPriceListDetailsID) 
    		{
    		    return this.Repository.GetSalesPriceListDetailsWithProducts(SalesPriceListDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceListDetails GetSalesPriceListDetailsWithSalesPriceList(int SalesPriceListDetailsID) 
    		{
    		    return this.Repository.GetSalesPriceListDetailsWithSalesPriceList(SalesPriceListDetailsID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.SalesPriceListDetails GetSalesPriceListDetailsWithTax(int SalesPriceListDetailsID) 
    		{
    		    return this.Repository.GetSalesPriceListDetailsWithTax(SalesPriceListDetailsID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesPriceListDetails Obj)
            {
                Delete(Obj.SalesPriceListDetailsID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesPriceListDetails Obj)
            {
                DeleteLogical(Obj.SalesPriceListDetailsID);
            }
    	
            public void Delete(int SalesPriceListDetailsID) 
    		{
    			this.Repository.Delete(SalesPriceListDetailsID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesPriceListDetails MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    		 public void Insert(SilkeyERP.Model.SalesPriceListDetails Obj)
            {       
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesPriceListDetails Insert(SilkeyERP.Model.SalesPriceListDetails MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesPriceListDetails> Insert(List<SilkeyERP.Model.SalesPriceListDetails> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesPriceListDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesPriceListDetails MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesPriceListDetails MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesPriceListDetails MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SalesStatusController : NAGFwk.BL.IBaseController<Model.SalesStatus>
    {
    
           private readonly SilkeyERP.Model.SalesStatusRepository Repository;
    
            public SalesStatusController()
            {
                    this.Repository = new Model.SalesStatusRepository();
            }
    
    		public struct SalesStatusRelatedEntities
            {
                			   
    			      public string Sales { get { return "Sales"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.SalesStatus GetSalesStatusWithAllChilds(int StatusID) 
            {
    				 return this.Repository.GetSalesStatusWithAllChilds(StatusID);
    		}
    			
            public SilkeyERP.Model.SalesStatus GetSalesStatus(int StatusID) 
            {
    		    return this.Repository.GetSalesStatus(StatusID); 
    		}
    				public List<SilkeyERP.Model.SalesStatus> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public SalesStatus GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.SalesStatus GetSalesStatusWithSales(int StatusID) 
    		{
    		    return this.Repository.GetSalesStatusWithSales(StatusID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.SalesStatus Obj)
            {
                Delete(Obj.StatusID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.SalesStatus Obj)
            {
                DeleteLogical(Obj.StatusID);
            }
    	
            public void Delete(int StatusID) 
    		{
    			this.Repository.Delete(StatusID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.SalesStatus MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.SalesStatus MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.SalesStatus Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.SalesStatus Insert(SilkeyERP.Model.SalesStatus MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.SalesStatus> Insert(List<SilkeyERP.Model.SalesStatus> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.SalesStatus MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.SalesStatus MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.SalesStatus MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.SalesStatus MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.SalesStatus MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class SuppliersController : NAGFwk.BL.IBaseController<Model.Suppliers>
    {
    
           private readonly SilkeyERP.Model.SuppliersRepository Repository;
    
            public SuppliersController()
            {
                    this.Repository = new Model.SuppliersRepository();
            }
    
    		public struct SuppliersRelatedEntities
            {
                			   
    			      public string BuyPriceList { get { return "BuyPriceList"; } }
    			  			   
    			      public string PaymentSupplier { get { return "PaymentSupplier"; } }
    			  			   
    			      public string Address { get { return "Address"; } }
    			  			   
    			      public string Email { get { return "Email"; } }
    			  			   
    			      public string Phones { get { return "Phones"; } }
    			  			   
    			      public string BuyPriceList1 { get { return "BuyPriceList1"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Suppliers GetSuppliersWithAllChilds(int SupplierID) 
            {
    				 return this.Repository.GetSuppliersWithAllChilds(SupplierID);
    		}
    			
            public SilkeyERP.Model.Suppliers GetSuppliers(int SupplierID) 
            {
    		    return this.Repository.GetSuppliers(SupplierID); 
    		}
    				public List<SilkeyERP.Model.Suppliers> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Suppliers GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithBuyPriceList(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithBuyPriceList(SupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithPaymentSupplier(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithPaymentSupplier(SupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithAddress(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithAddress(SupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithEmail(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithEmail(SupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithPhones(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithPhones(SupplierID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Suppliers GetSuppliersWithBuyPriceList1(int SupplierID) 
    		{
    		    return this.Repository.GetSuppliersWithBuyPriceList1(SupplierID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Suppliers Obj)
            {
                Delete(Obj.SupplierID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Suppliers Obj)
            {
                DeleteLogical(Obj.SupplierID);
            }
    	
            public void Delete(int SupplierID) 
    		{
    			this.Repository.Delete(SupplierID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Suppliers MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Suppliers MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Suppliers Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Suppliers Insert(SilkeyERP.Model.Suppliers MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Suppliers> Insert(List<SilkeyERP.Model.Suppliers> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Suppliers MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Suppliers MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Suppliers MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Suppliers MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Suppliers MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class TaxController : NAGFwk.BL.IBaseController<Model.Tax>
    {
    
           private readonly SilkeyERP.Model.TaxRepository Repository;
    
            public TaxController()
            {
                    this.Repository = new Model.TaxRepository();
            }
    
    		public struct TaxRelatedEntities
            {
                			   
    			      public string BuyPriceListDetails { get { return "BuyPriceListDetails"; } }
    			  			   
    			      public string PaymentSupplier { get { return "PaymentSupplier"; } }
    			  			   
    			      public string PaymentSupplierDetails { get { return "PaymentSupplierDetails"; } }
    			  			   
    			      public string Sales { get { return "Sales"; } }
    			  			   
    			      public string SalesDetails { get { return "SalesDetails"; } }
    			  			   
    			      public string SalesPriceListByCustomer { get { return "SalesPriceListByCustomer"; } }
    			  			   
    			      public string SalesPriceListDetails { get { return "SalesPriceListDetails"; } }
    			  			   
    			      public string TaxFigure { get { return "TaxFigure"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.Tax GetTaxWithAllChilds(int TaxID) 
            {
    				 return this.Repository.GetTaxWithAllChilds(TaxID);
    		}
    			
            public SilkeyERP.Model.Tax GetTax(int TaxID) 
            {
    		    return this.Repository.GetTax(TaxID); 
    		}
    				public List<SilkeyERP.Model.Tax> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public Tax GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.Tax GetTaxWithBuyPriceListDetails(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithBuyPriceListDetails(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithPaymentSupplier(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithPaymentSupplier(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithPaymentSupplierDetails(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithPaymentSupplierDetails(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithSales(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithSales(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithSalesDetails(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithSalesDetails(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithSalesPriceListByCustomer(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithSalesPriceListByCustomer(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithSalesPriceListDetails(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithSalesPriceListDetails(TaxID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.Tax GetTaxWithTaxFigure(int TaxID) 
    		{
    		    return this.Repository.GetTaxWithTaxFigure(TaxID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.Tax Obj)
            {
                Delete(Obj.TaxID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.Tax Obj)
            {
                DeleteLogical(Obj.TaxID);
            }
    	
            public void Delete(int TaxID) 
    		{
    			this.Repository.Delete(TaxID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.Tax MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.Tax MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.Tax Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.Tax Insert(SilkeyERP.Model.Tax MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.Tax> Insert(List<SilkeyERP.Model.Tax> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.Tax MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.Tax MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.Tax MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.Tax MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.Tax MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class TaxFigureController : NAGFwk.BL.IBaseController<Model.TaxFigure>
    {
    
           private readonly SilkeyERP.Model.TaxFigureRepository Repository;
    
            public TaxFigureController()
            {
                    this.Repository = new Model.TaxFigureRepository();
            }
    
    		public struct TaxFigureRelatedEntities
            {
                			   
    			      public string Customer { get { return "Customer"; } }
    			  			   
    			      public string Tax { get { return "Tax"; } }
    			          }
    
    		//*****************************************************************************************
    		//***************************Methods By Primary Key****************************************
    		//*****************************************************************************************
    		 public SilkeyERP.Model.TaxFigure GetTaxFigureWithAllChilds(int TaxFigureID) 
            {
    				 return this.Repository.GetTaxFigureWithAllChilds(TaxFigureID);
    		}
    			
            public SilkeyERP.Model.TaxFigure GetTaxFigure(int TaxFigureID) 
            {
    		    return this.Repository.GetTaxFigure(TaxFigureID); 
    		}
    				public List<SilkeyERP.Model.TaxFigure> GetAll() 
            {
    		    return this.Repository.GetAll().Where(x => x.Enable == true).ToList();
    		}
    				  public TaxFigure GetByID(int ID)
            {
                return this.Repository.GetByID(ID);
            }
    		//*****************************************************************************************
    		//***************************Methods By Related Entities****************************************
    		//*****************************************************************************************
    				   
    
    		public SilkeyERP.Model.TaxFigure GetTaxFigureWithCustomer(int TaxFigureID) 
    		{
    		    return this.Repository.GetTaxFigureWithCustomer(TaxFigureID);  
    		}			
    
    			  			   
    
    		public SilkeyERP.Model.TaxFigure GetTaxFigureWithTax(int TaxFigureID) 
    		{
    		    return this.Repository.GetTaxFigureWithTax(TaxFigureID);  
    		}			
    
    			  	    //*****************************************************************************************
    		//***************************CRUD Operations***********************************************
    		//*****************************************************************************************
    		#region "Delete"
    		
            public void DeleteLogical(int ID)
            {
                this.Repository.DeleteLogical(ID);
            }
    
    		 public void Delete(SilkeyERP.Model.TaxFigure Obj)
            {
                Delete(Obj.TaxFigureID);
            }
    
            public void DeleteLogical(SilkeyERP.Model.TaxFigure Obj)
            {
                DeleteLogical(Obj.TaxFigureID);
            }
    	
            public void Delete(int TaxFigureID) 
    		{
    			this.Repository.Delete(TaxFigureID);  
    		}
    
    		//public void Delete(SilkeyERP.Model.TaxFigure MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Delete(MyObj,Tran);  
    		//}
    
    		//public void TransactionalDelete(SilkeyERP.Model.TaxFigure MyObj) 
    		//{
    			//this.Repository.TransactionalDelete(MyObj);  
    		//}
    		#endregion
    
    		#region "Insert"
    				  public void Insert(SilkeyERP.Model.TaxFigure Obj)
            {
                Obj.Enable = true;
                this.Repository.Insert(Obj);
            }
    			    //public SilkeyERP.Model.TaxFigure Insert(SilkeyERP.Model.TaxFigure MyObj) 
    		//{
    			//return this.Repository.Insert(MyObj);  
    		//}
    
    		//public IList<SilkeyERP.Model.TaxFigure> Insert(List<SilkeyERP.Model.TaxFigure> MyObjs) 
    		//{
    		//return	this.Repository.Insert(MyObjs);  
    		//}
    		
    		//public void Insert(SilkeyERP.Model.TaxFigure MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			//this.Repository.Insert(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalInsert(SilkeyERP.Model.TaxFigure MyObj) 
    		//{
    			 //this.Repository.TransactionalInsert(MyObj);  
    		//}
    		#endregion
    
    		#region "Update"	
    		
    	    public void Update(SilkeyERP.Model.TaxFigure MyObj) 
    		{
    			 this.Repository.Update(MyObj);  
    		}		
    		
    		//public void Update(SilkeyERP.Model.TaxFigure MyObj, System.Data.Entity.DbContextTransaction Tran) 
    		//{
    			 //this.Repository.Update(MyObj,Tran);  
    		//}
    		
    		//public void TransactionalUpdate(SilkeyERP.Model.TaxFigure MyObj) 
    		//{
    			 //this.Repository.TransactionalUpdate(MyObj);  
    		//}
    		#endregion
    
    }
}



//*****************************************************************************************
//********************************Functions Section****************************************
//*****************************************************************************************
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetSalesController
    {
    		private readonly SilkeyERP.Model.GetSalesRepository Repository;
    
            public GetSalesController()
            {
                    this.Repository = new Model.GetSalesRepository();
            }
     public IQueryable<GetSales_Result> GetSales(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo, Nullable<bool> isByHour)
    {
    return this.Repository.GetSales(dateFrom, dateTo, isByHour);
    }
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetSalesByChannelController
    {
    		private readonly SilkeyERP.Model.GetSalesByChannelRepository Repository;
    
            public GetSalesByChannelController()
            {
                    this.Repository = new Model.GetSalesByChannelRepository();
            }
     public IQueryable<GetSalesByChannel_Result> GetSalesByChannel(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo)
    {
    return this.Repository.GetSalesByChannel(dateFrom, dateTo);
    }
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetSalesByProductController
    {
    		private readonly SilkeyERP.Model.GetSalesByProductRepository Repository;
    
            public GetSalesByProductController()
            {
                    this.Repository = new Model.GetSalesByProductRepository();
            }
     public IQueryable<GetSalesByProduct_Result> GetSalesByProduct(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo)
    {
    return this.Repository.GetSalesByProduct(dateFrom, dateTo);
    }
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetSalesByRegionController
    {
    		private readonly SilkeyERP.Model.GetSalesByRegionRepository Repository;
    
            public GetSalesByRegionController()
            {
                    this.Repository = new Model.GetSalesByRegionRepository();
            }
     public IQueryable<GetSalesByRegion_Result> GetSalesByRegion(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo)
    {
    return this.Repository.GetSalesByRegion(dateFrom, dateTo);
    }
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetSalesBySectorController
    {
    		private readonly SilkeyERP.Model.GetSalesBySectorRepository Repository;
    
            public GetSalesBySectorController()
            {
                    this.Repository = new Model.GetSalesBySectorRepository();
            }
     public IQueryable<GetSalesBySector_Result> GetSalesBySector(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo)
    {
    return this.Repository.GetSalesBySector(dateFrom, dateTo);
    }
    }
}
namespace SilkeyERP.BL
{
    using System;
    using System.Collections.Generic; 
    using SilkeyERP.Model;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    public partial class GetTotalSalesByRangeController
    {
    		private readonly SilkeyERP.Model.GetTotalSalesByRangeRepository Repository;
    
            public GetTotalSalesByRangeController()
            {
                    this.Repository = new Model.GetTotalSalesByRangeRepository();
            }
     public IQueryable<GetTotalSalesByRange_Result> GetTotalSalesByRange(Nullable<System.DateTime> dateFrom, Nullable<System.DateTime> dateTo)
    {
    return this.Repository.GetTotalSalesByRange(dateFrom, dateTo);
    }
    }
}
          

